// * 请求响应参数(不包含data)
export interface Result {
  code: string;
  msg: string;
}

// * 分页请求参数
export interface ReqPage {
  page: number;
  size: number;
  total:number;
}

// * 登录模块
export namespace Login {
  export interface ReqLoginForm {
    username: string;
    password: string;
  }
  export interface ResLogin {
    access_token: string;
  }
  export interface ResAuthButtons {
    [propName: string]: any;
  }
}
// * 请求响应参数(包含data)
export interface ResultData<T = any> extends Result {
  data: T;
}

// * im模块
export namespace Chat {
  export interface autoChat {
    page?: number;
    size?: number;
    type?: number;
    content?: string;
  }
  export interface autoChatAdd {
    type: number;
    status: number;
    condition: string;
    content: string;
  }
  export interface autoChatEdit {
    id: number;
    type: number;
    status: number;
    condition: string;
    content: string;
  }
}

export namespace Game {
  export interface GameListData {
    desc: string,
    icon: string,
    name: string,
    play_method: string,
    updatedAt: string,
    route: string,
    _id: string
  }
  export interface UserInfo {
    email: string;
    name: string;
    avatar: string;
    _id: string;
  }
  export interface GameRankData {
    num: number,
    name: string,
    avatar: string,
    label: string
  }
  export interface SetScore {
    game_id: string,
    score: number,
    label: string
  }
  export interface GetGameRank {
    game_id: string,
    page: number,
    size: number
  }
}